package it.webFlora.Dao;


import java.io.Serializable;
import java.util.*;
import java.sql.*;

public class DbConnection {
	
	 Connection conn;
	
	 public Connection getConnection()
     {
      try {

	Class.forName("com.mysql.jdbc.Driver");
	conn=DriverManager.getConnection("jdbc:mysql://localhost/webflora","root","");
	System.out.println("Connessione avvenuta !!");
	 }	
  catch (ClassNotFoundException e) {
	e.printStackTrace(); }
	catch (SQLException ex) {
	ex.printStackTrace(); }
	return conn;
	}



		public void closeSession(){
		try {
		conn.close();
		}catch (SQLException ex) {
		ex.printStackTrace(); }
		}

}
